/*
*	ID : Pallab
* 	PROG : B
* 	LANG : C++
* 	2012-12-12-13.32.01 Wednesday
*
* 	"I have not failed, I have just found 10000 ways that won't work.
*/
#include <iostream>
#include <algorithm>
#include <vector>
#include <sstream>
#include <fstream>
#include <string>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <numeric>
#include <stack>
#include <functional>
#include <bitset>
#include <iomanip>
#include <chrono>
#include <unordered_set>
#include <unordered_map>
#include <array>

#include <ctime>
#include <cassert>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <climits>
#include <cstring>
#include <cstdlib>

using namespace std;

#define foR(i1,st,ed) for(int i1 = st , j1 = ed ; i1 < j1 ; ++i1 )
#define fo(i1,ed) foR( i1 , 0 , ed )
#define foE(i1,st,ed) foR( i1, st, ed+1 )
#define foit(i, x) for (typeof((x).begin()) i = (x).begin(); i != (x).end(); i++)
#define bip system("pause")
#define Int long long
#define pb push_back
#define SZ(X) (int)(X).size()
#define LN(X) (int)(X).length()
#define mk make_pair
#define SET( ARRAY , VALUE ) memset( ARRAY , VALUE , sizeof(ARRAY) )
#define line puts("")

inline void wait(double seconds) {
    double endtime = clock() + (seconds * CLOCKS_PER_SEC);
    while (clock() < endtime) {
        ;
    }
}
template<class T>
inline T fastIn() {
    register char c=0;
    register T a=0;
    bool neg=false;
    while(c<33)c=getchar();
    while(c>33) {
        if(c=='-') {
            neg=true;
        } else {
            a= (a*10)+(c-'0');
        }
        c=getchar();
    }
    return neg?-a:a;
}
const int MX=(int)1e5+5;
int num_count;
int numbers[MX];
inline void read() {
    num_count=fastIn<int>();
    fo(i,num_count)numbers[i]=fastIn<int>();
    sort(numbers,numbers+num_count,less<int>());
}

const int inf=1023456789;
int dp[5001][5001];
int go(int i, int j,int cur_low,int cur_high) {
    if(i>=j) {
        return 0;
    }
    int &bst=dp[cur_low][cur_high];
    if(bst!=-1)return bst;
    bst=inf;
    if(cur_high>cur_low*2) {
        int _i=i,cnt1=0;
        while( _i<j && cur_low==numbers[_i] ) {
            ++_i,++cnt1;
        }
        bst=min(bst,cnt1+go(_i,j,numbers[_i],cur_high));
        int _j=j,cnt2=0;
        while(_j>=i && cur_high==numbers[_j] ) {
            --_j,++cnt2;
        }
        bst=min(bst,cnt2+go(i,_j,cur_low,numbers[_j]));
    } else {
        bst=0;
    }
    return bst;
}
int freq[5005];
inline int solve2() {
    SET(freq,0);
    fo(i,num_count)freq[ numbers[i] ]++;

    int bst=inf,prv=0;
    for(int i=1; i<=5000; ++i) {
        if(!freq[i])continue;

        int cnt=0;
        for(int j=(i*2)+1; j<=5000; ++j)cnt+=freq[j];
        bst=min(bst,prv+cnt);
        prv+=freq[i];

    }
    return bst;
}
inline void proc() {
    SET(dp,-1);
    //int retval=go(0,num_count-1,numbers[0],numbers[num_count-1]);
    int retval=solve2();
    cout<<retval<<'\n';
}
int main() {
    int kase = 1;
#if defined( xerxes_pc )
    if (!freopen("in1", "r", stdin))
        puts("error opening file in "), assert(0);
    kase = 1;
#else
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
#endif
    fo(i,kase) {
        read();
        proc();
    }
    return 0;
}
